package com.dongdongshop.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.dongdongshop.mapper.address.SalePointsMapper;
import com.dongdongshop.pojo.salepoints.SalePoints;
import com.dongdongshop.service.salepoints.SalePointsService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
@Service
public class SalePointsServiceImpl implements SalePointsService {
    @Resource
    private SalePointsMapper salePointsMapper;
    @Override
    public SalePoints selectByUserId(String userId) {
        return salePointsMapper.selectByUserId(userId);
    }

    @Override
    public void updateById(SalePoints salePoints) {
        salePointsMapper.updateByPrimaryKeySelective(salePoints);
    }

    @Override
    public void insertSale(SalePoints addSale) {
        salePointsMapper.insertSelective(addSale);
    }
}
